export default {
  data() {
    const pagerEvents = {
      "size-change": this.sizeChangeHandler,
      "current-change": this.currentChangeHandler
    }
    return {
      pagerOptions: {
        currPage: 1,
        pageSize: 10,
        totalCount: 0
      },
      pagerEvents
    }
  },
  methods: {
    sizeChangeHandler(val) {
      this.pagerOptions.currPage = 1
      this.pagerOptions.pageSize = val
      this.getData()
    },
    currentChangeHandler(val) {
      this.pagerOptions.currPage = val
      this.getData()
    }
  }
}
